<template>
  <div>
    <h2>Home</h2>
  </div>
</template>
<script>
export default {
  beforeRouteUpdate(to, from, next) {
    console.log('Home beforeUpdate');
    next();
  },

  beforeRouteEnter(to, from, next) {
    console.log('home beforeRouteEnter');
    next((vm) => {
      console.log('home beforeRouteEnter next');
      // vm===this
      // console.log(vm);
    });
    // if (from.name === 'cart' || from.name === 'order') {
    //   next();
    // } else {
    //   next(false);
    // }

  }
}
</script>